// 统一请求路径前缀在libs/axios.js中修改
import {getRequest, postRequest, putRequest, deleteRequest, uploadFileRequest} from '@/libs/axios';


// 课程分类-tree数据
export const selectCourseType = (params) => {
    return postRequest('/base/coursetype/selectTreeData', params);
}
// 课程分类-添加
export const addCrouseType = (params) => {
    return postRequest('/base/coursetype/add', params)
}

// 课程分类-修改
export const editCrouseType = (params) => {
    return postRequest('/base/coursetype/edit', params)
}
// 课程分类-删除
export const delCrouseType = (courseTypeId) => {
    return postRequest(`/base/coursetype/delById/${courseTypeId}`)
}

// 课程-列表
export const crouseList = (params) => {
    return postRequest('/base/course/list', params)
}
// 课程-列表
export const crouseList2 = (params) => {
    return postRequest('/base/course/courseList', params)
}
// 课程-添加
export const addCrouse = (params) => {
    return postRequest('/base/course/add', params)
}
// 课程-获取
export const getCourse = (courseId, params) => {
    return getRequest(`/base/course/get/${courseId}`, params)
}
// 课程-修改
export const editCourse = (params) => {
    return postRequest('/base/course/edit', params)
}
// 课程-删除
export const delCrouse = (ids) => {
    return postRequest('/base/course/delByIds', {
        ids: ids
    })
}
// 课程-更新推荐状态
export const setRecommend = (params) => {
    return postRequest('/base/course/setRecommend', params)
}
// 课程-更新上架状态
export const setCourseStatus = (params) => {
    return postRequest('/base/course/setCourseStatus', params)
}


//课程所属模块
export const selectIndexTag = (params) => {
    return postRequest('/base/course/selectIndexTag', params)
}


//修改课程模块
export const setIndexTagId = (params) => {
    return postRequest('/base/course/setIndexTagId', params)
}



/*课程目录接口--benin*/

// tree数据
export const selectCataLog = (params) => {
    return postRequest('/base/catalog/selectTreeData', params)
}
//添加
export const addCataLog = (params) => {
    return postRequest('/base/catalog/add', params)
}
//修改
export const editCataLog = (params) => {
    return postRequest('/base/catalog/edit', params)
}
// 删除
export const delCataLog = (cataLogId) => {
    return postRequest(`/base/catalog/delById/${cataLogId}`)
}

// 课程目录-列表
export const cataLogList = (params) => {
    return postRequest('/base/catalog/list', params)
}
// 更新编号
export const updateCataLogNo = (params) => {
    return postRequest('/base/catalog/updateCataLogNo', params)
}

// tree数据
export const selectFirstTreeData = (params) => {
    return postRequest('/base/catalog/selectFirstTreeData', params)
}

// tree数据
export const updateCataLogSortOrder = (params) => {
    return postRequest('/base/catalog/updateCataLogSortOrder', params)
}
// tree数据
export const updateSortOrder = (params) => {
    return postRequest('/base/catalog/updateSortOrder', params)
}

/*课程目录接口--end*/


/*直播模块接口--benin*/

//列表
export const liveList = (params) => {
    return postRequest('/base/live/list', params)
}
//添加
export const addLive = (params) => {
    return postRequest('/base/live/add', params)
}
//根据ID查询
export const getLive = (id, params) => {
    return getRequest(`/base/live/get/${id}`, params)
}
//修改
export const editLive = (params) => {
    return postRequest('/base/live/edit', params)
}
//删除
export const delLive = (ids) => {
    return postRequest('/base/live/delByIds', {
        ids: ids
    })
}
//更新上架状态
export const setLiveStatus = (params) => {
    return postRequest('/base/live/setLiveStatus', params)
}
/*直播模块接口--end*/


/*线下课程模块--benin*/

//列表
export const offCourseList = (params) => {
    return postRequest('/base/offcourse/list', params)
}
//添加
export const addOffCourse = (params) => {
    return postRequest('/base/offcourse/add', params)
}
//根据ID查询
export const getOffCourse = (id, params) => {
    return getRequest(`/base/offcourse/get/${id}`, params)
}
//修改
export const editOffCourse = (params) => {
    return postRequest('/base/offcourse/edit', params)
}
//删除
export const delOffCourse = (ids) => {
    return postRequest('/base/offcourse/delById', {
        ids: ids
    })
}
//更新上架状态
export const setOffCourseStatus = (params) => {
    return postRequest('/base/offcourse/setOffCourseStatus', params)
}
//更新报名状态
export const setApplyType = (params) => {
    return postRequest('/base/offcourse/setApplyType', params)
}
/*线下课程模块--end*/


/*题库管理--benin*/

// tree数据
export const selectExamType = (params) => {
    return postRequest('/base/examtype/tree', params)
}
// tree数据
export const selectExamType2 = (params) => {
    return postRequest('/base/examtype/treeRank', params)
}
// 删除
export const delExam = (ids) => {
    return postRequest('/base/exam/delByIds', {
        ids: ids
    })
}
//根据ID查询
export const getExam = (id, params) => {
    return getRequest(`/base/exam/get/${id}`, params)
}
//列表
export const examList = (params) => {
    return postRequest('/base/exam/list', params)
}
//添加
export const addExam = (params) => {
    return postRequest('/base/exam/add', params)
}
//修改
export const updateExam = (params) => {
    return postRequest('/base/exam/update', params)
}

/*题库管理--end*/


// 获取测评信息
export const getAbiltity = (id) => {
    return getRequest(`/base/abiltity/get/${id}`)
}
//修改
export const updateAbiltity= (params) => {
    return postRequest('/base/abiltity/update', params)
}


// 修改
export const editStudent = (params) => {
    return postRequest('/base/student/edit', params)
}
// 删除
export const delStudent = (ids) => {
    return postRequest("/base/student/delByIds",{
        ids: ids
    })
}

// 列表
export const studentList = (params) => {
    return postRequest('/base/student/list', params)
}

// 获取单个对象
export const getStudent = (id) => {
    return postRequest(`/base/student/get/${id}`)
}
// 更新状态
export const setStatus = (params) => {
    return postRequest('/base/student/setStatus', params)
}


//订单列表
export const orderList = (params) => {
    return postRequest('/base/order/list', params)
}
//发票信息
export const invoiceList = (id) => {
    return postRequest(`/base/invoice/invoiceList/${id}`)
}

/**  企业管理  **/

//员工管理
export const staffList = (params) => {
    return postRequest('/base/staff/list', params)
}
//员工信息
export const staffDetail = (id) => {
    return getRequest(`/base/staff/staffDetail/${id}`)
}
//认证工作经历
export const checkUserWork = (id) => {
    return getRequest(`/base/workcourse/checkUserWork/${id}`)
}
//认证拒绝工作经历
export const checkUserWorkRefuse = (id) => {
    return getRequest(`/base/workcourse/checkUserWorkRefuse/${id}`)
}
//认证教育经历
export const checkUserEdu = (id) => {
    return getRequest(`/base/education/checkUserEdu/${id}`)
}
//拒绝教育经历
export const checkUserEduRefuse = (id) => {
    return getRequest(`/base/education/checkUserEduRefuse/${id}`)
}
//员工项目分
export const staffScore = (id) => {
    return getRequest(`/base/staff/staffScore/${id}`)
}
//添加企业员工
export const addStaff = (params) => {
    return postRequest('/base/staff/addStaff', params)
}
//添加企业员工
export const editStaff = (params) => {
    return postRequest('/base/staff/editStaff', params)
}
//获取企业部门
export const getDepartment = (parentId) => {
    return getRequest(`/base/staff/getDepartment/${parentId}`)
}
//员工信息
export const staffInfo = (id) => {
    return getRequest(`/base/staff/staffInfo/${id}`)
}
//批量删除员工
export const delStaff = (ids) => {
    return postRequest("/base/staff/delByIds",{ids: ids})
}
//hr打分
export const hrGrade = (params) => {
    return postRequest("/base/staff/hrGrade", params)
}
//添加企业黑名单
export const addBlacklist = (id) => {
    return getRequest(`/base/staff/addBlacklist/${id}`)
}
//移除企业黑名单
export const delBlacklist = (id) => {
    return getRequest(`/base/staff/delBlacklist/${id}`)
}
//企业排名
export const companyRank = (params) => {
    return postRequest("/base/staff/companyRank", params)
}
//学习计划列表
export const planList = (params) => {
    return postRequest('/base/plan/list', params)
}
//删除学习计划
export const removePlan = (id) => {
    return getRequest(`/base/plan/removePlan/${id}`)
}
//企业部门列表
export const deptList = (params) => {
    return postRequest('/base/plan/deptList', params)
}
//添加学习计划
export const addPlan = (params) => {
    return postRequest('/base/plan/add', params)
}
//添加学习计划
export const editPlan = (params) => {
    return postRequest('/base/plan/edit', params)
}
//修改查询学习计划信息
export const complanInfo = (id) => {
    return getRequest(`/base/plan/complanInfo/${id}`)
}
//计划内员工
export const getStaffData = (params) => {
    return postRequest('/base/plan/getStaffData', params)
}
//计划内课程
export const getCourseData = (params) => {
    return postRequest('/base/plan/getCourseData', params)
}
//计划内课程
export const getDeptData = (params) => {
    return postRequest('/base/plan/getDeptData', params)
}
